public class Dem {
    public static void main(String[] args) {
        // 实例化四大名著对象
        Book book1 = new Book();
        book1.title = "西游记";
        book1.author = "吴承恩";

        Book book2 = new Book();
        book2.title = "三国演义";
        book2.author = "罗贯中";

        Book book3 = new Book();
        book3.title = "水浒传";
        book3.author = "施耐庵";

        Book book4 = new Book();
        book4.title = "红楼梦";
        book4.author = "曹雪芹";

        // 依次输出每本书的信息
        book1.printInfo();
        book2.printInfo();
        book3.printInfo();
        book4.printInfo();
    }
}